import java.io.File;

/**
 * Created with IntelliJ IDEA.
 * Description: 判断用户对文件是否有读/写操作的权限
 */
public class FileTest7 {
    public static void main(String[] args) {
        File file = new File("d:/test.txt");
        // 判断读
        System.out.println(file.canRead());
        // 判断写
        System.out.println(file.canWrite());
    }
}
